package br.com.mundoj.subscription.client.events;

import br.com.mundoj.subscription.client.Subscription;

import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;

public class SaveSubscriptionEvent extends GwtEvent<SaveSubscriptionEvent.Handler> {
	public interface Handler extends EventHandler {
		void onEvent(SaveSubscriptionEvent event);
	}

	public static final Type TYPE = new Type();
	
	public final Subscription subscription;

	public SaveSubscriptionEvent(Subscription subscription) {
		this.subscription = subscription;
	}

	@Override
	protected void dispatch(Handler handler) {
		handler.onEvent(this);
	}

	@Override
	public Type getAssociatedType() {
		return TYPE;
	}
}